package nl.hanze.designpatterns.Domain;

import java.io.Serializable;

public class TroubleTicket implements Serializable{


    public Integer id;
    public String userName;
    public String callerName;
    public String description;
    public String dateTime;

    public TroubleTicket(){

    }

	public TroubleTicket(String userName, String callerName, String description, String dateTime) {
		this.setUserName(userName);
		this.setCallerName(callerName);
		this.setDescription(description);
		this.setDateTime(dateTime);
	}

    public int getId() {
        if (id == null) {
            return 0;
        } else {
            return id;
        }

    }

	public String getUserName() {
		if (userName == null) {
            return "";
        } else {
            return userName;
        }
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getCallerName() {
        if (callerName == null) {
            return "";
        } else {
            return callerName;
        }
	}

	public void setCallerName(String callerName) {
		this.callerName = callerName;
	}

	public String getDescription() {
        if (description == null) {
            return "";
        } else {
            return description;
        }
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getDateTime() {
        if (dateTime == null) {
            return "";
        } else {
            return dateTime;
        }
	}

	public void setDateTime(String dateTime) {
		this.dateTime = dateTime;
	}

    public String toString() {

        return "\"" + description + "\" by " + callerName;
    }
}
